package biz.ezcom.design.pattern.observer;

/**
 *  
 */
public class Client {
	public static void main(String[] args) {
		//看股票的同事
		ObserverStock stock1 = new ObserverStock();
		stock1.setName("Andy");
		ObserverStock stock2 = new ObserverStock();
		stock2.setName("Felix");
		
		//老板：出去了
		ObservableBoss boss = new ObservableBoss("出去了");
		//唤醒者增加观察者
		boss.addObserver(stock1);
		boss.addObserver(stock2);
		
		System.out.println("====start=====");
		boss.setStatus("回来了");
		System.out.println("====end=====");
	}
}
